import React, { Component } from 'react';
import Link from 'umi/link';
import axios from 'axios';
import Api from '../../services/apis';
import Part1 from './part1';
import Part2 from './part2';
import Part3 from './part3';

import styles from "./style.less";


class HomePage extends Component {
  constructor(props) {
    super(props);
    this.state = {
      data: {}
    }
  }
  componentWillMount() {
    axios.get(Api.getAllCount).then((res) => {
      this.setState({
        data: res.data
      });
    })
  }

  render() {
    return (
      <div className={styles.homePage} >
        <Part1 data={this.state.data} />
        <Part2 data={this.state.data} />
        {/* <Part3 data={this.state.data} /> */}
      </div>
    );
  }
}

export default HomePage;
